float4x4 gWVPmatrix;

texture gTex0;

sampler TexOS = sampler_state
{
	Texture = <gTex0>;
	MinFilter = ANISOTROPIC;
	MagFilter = LINEAR;
	MaxAnisotropy = 4;
};

struct OutputVS
{
	float4	pos	: POSITION0;
	float2	uv	: TEXCOORD0;
};

OutputVS BasicTexVS(float2 posIN : POSITION0, float2 uvIN : TEXCOORD0)
{
	OutputVS outVS = (OutputVS)0;
	
	//Transform the vertex into clip space
	outVS.pos = mul(float4(posIN, 0.0f, 1.0f), gWVPmatrix);
	
	//Pass on the texture coordinates
	outVS.uv = uvIN;
	
	//Done
	return outVS;
}

float4 BasicTexPS(float2 uvIN : TEXCOORD0) : COLOR
{
	//return float4(1, 0, 0, 0);
	return tex2D(TexOS, uvIN);
}

technique Basic
{
    pass P0
    {
        vertexShader = compile vs_2_0 BasicTexVS();
        pixelShader  = compile ps_2_0 BasicTexPS();
        
        //CULLMODE = NONE;
    }
}